import VueRouter from 'vue-router'
import Login from '@/pages/login'
import Index from '@/layout/index'
import Test from '@/pages/test'
import DataStorage from '@/pages/dataStorage'
import DataCollection from '@/pages/dataCollection'
import Manage from '@/pages/manage'
import Train from '@/pages/train'
import DataManage from '@/pages/dataManage'
import DataExcavate from '@/pages/dataExcavate'
import ProcessManage from '@/pages/processManage'
import ProjectTemplate from '@/pages/projectTemplate'
import ModelManage from '@/pages/modelManage'
import Vue from 'vue'
Vue.use(VueRouter)

const router = new VueRouter({
    mode: 'history',
    routes: [{
            path: '/',
            redirect: '/index', //测试修改为index

        }, {
            path: '/login',
            name: Login,
            component: Login
        },
        {
            path: '/Index',
            name: 'Index',
            component: Index,
            children: [{
                    path: 'test',
                    name: 'Test',
                    component: Test
                }, {
                    path: 'dataStorage',
                    name: 'DataStorage',
                    component: DataStorage
                }, {
                    path: 'dataCollection',
                    name: 'DataCollection',
                    component: DataCollection
                },
                {
                    path: 'manage',
                    name: 'Manage',
                    component: Manage
                },
                {
                    path: 'train',
                    name: 'Train',
                    component: Train
                },
                {
                    path: 'dataManage',
                    name: 'dataManage',
                    component: DataManage
                },
                {
                    path: 'dataExcavate',
                    name: 'dataExcavate',
                    component: DataExcavate
                },
                {
                    path: 'processManage',
                    name: 'processManage',
                    component: ProcessManage
                },
                {
                    path: 'modelManage',
                    name: 'modelManage',
                    component: ModelManage
                },
                {
                    path: 'projectTemplate',
                    name: 'projectTemplate',
                    component: ProjectTemplate
                },
            ]
        }
    ]
})

export default router;